﻿
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=yes" />
    <meta name="format-detection" content="email=no" />
    <title>勘查信息手机版</title>
    <link rel="stylesheet" type="text/css" href="css/css.css" />
    <link rel="stylesheet" type="text/css" href="css/buttons.css" />
    <meta content="勘查信息手机版" name="keywords" />
    <!-- 权限设置 -->
    <script type="text/javascript" src="writeJS/WebApi.js"></script>
    <style type="text/css">
        #allmap {
            width: 100%;
            height: 250px;
            overflow: hidden;
            margin: 0;
            font-family: "微软雅黑";
        }
    </style>

</head>
<body>
    <div class="tzrl_box">
        <div class="mq_top">
            <div class="btn_back_l">
                <a class="btn_back" onclick="history.go(-1)">
                    <span></span>
                    <nav>返回</nav>
                </a>
            </div>
            <div class="mq_title">
                建筑公共状况
            </div>
            <div class="btn_ch_r">
            </div>
        </div>
        <div class="job_content">
            <div class="d_description">
                <h3 class="d_title">
                    基本信息
                </h3>
                <div class="d_pos_box">
                    <dl>
                        <dt>哪栋楼：</dt>
                        <dd>
                            <input name="T_Buildingafew" class="input_boxfield" id="T_Buildingafew" value="" placeholder="" type="text" />
                        </dd>
                    </dl>
                    <dl style="margin-top:10px">
                        <dt style="margin-bottom:10px">
                            <button class="button blue" id="Clickontheget" data-id="190317" type="button" onclick="getLocation()">
                                确认定位
                            </button>
                        </dt>
                        <dd>
                            <!--<button class="button blue" id="Clickontheget" data-id="190317" type="button" onclick="getLocation()">
                                点击刷新
                            </button>-->
                            <div id="allmap"></div>
                        </dd>
                    </dl>
                    <dl>
                        <dt>定位坐标：</dt>
                        <dd>
                            <input name="T_Location" class="input_boxfield" id="T_Location" value="" placeholder="" type="text" disabled="disabled" />
                        </dd>
                    </dl>
                    <dl>
                        <dt>定位地址：</dt>

                        <dd>
                            <input name="T_LocationAddress" class="input_boxfield" id="T_LocationAddress" value="" placeholder="" type="text" disabled="disabled" />
                        </dd>
                    </dl>
                    <dl>
                        <dt>房屋结构：</dt>
                        <dd>
                            <span class="selectOption">
                                <select name="T_StructureID" id="T_StructureID">
                                    <option value="" selected=selected>钢筋混凝土</option>
                                    <option value="1">砖混结构</option>
                                    <option value="2">混合结构</option>
                                </select>
                            </span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>建筑类型：</dt>
                        <dd>
                            <span class="selectOption">
                                <select name="T_TypesID" id="T_TypesID">
                                    <option value="" selected=selected>高板</option>
                                    <option value="1">高塔</option>
                                    <option value="2">塔板结合</option>
                                    <option value="3">多层</option>
                                </select>
                            </span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>外立面装饰：</dt>
                        <dd>
                            <span class="selectOption">
                                <select name="T_FacadeID" id="T_FacadeID">
                                    <option value="" selected=selected>清水砖墙</option>
                                    <option value="1">石材</option>
                                    <option value="2">涂料</option>
                                    <option value="3">局部石材，局部涂料</option>
                                </select>
                            </span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>公共部位装修：</dt>
                        <dd>
                            <span class="selectOption">
                                <select name="T_CommonalityID" id="T_CommonalityID">
                                    <option value="" selected=selected>普通装修（水泥地面，墙面涂料，普通照明）</option>
                                    <option value="1">豪华装饰（墙面地面石材，不锈钢扶手）</option>
                                </select>
                            </span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>电梯：</dt>
                        <dd>
                            <span class="selectOption">
                                <select name="T_ElevatorID" id="T_ElevatorID">
                                    <option value="" selected=selected>无电梯</option>
                                    <option value="1">有电梯  部</option>
                                    <option value="2">每层 户</option>
                                </select>
                            </span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>供气：</dt>
                        <dd>
                            <span class="selectOption">
                                <select name="T_SupplyID" id="T_SupplyID">
                                    <option value="" selected=selected>管道燃气入户</option>
                                    <option value="1">无管道燃气</option>
                                </select>
                            </span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>供水：</dt>
                        <dd>
                            <span class="selectOption">
                                <select name="T_WaterID" id="T_WaterID">
                                    <option value="" selected=selected>市政供水</option>
                                    <option value="1">无市政供水</option>
                                </select>
                            </span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>供暖：</dt>
                        <dd>
                            <span class="selectOption">
                                <select name="T_HeatingID" id="T_HeatingID">
                                    <option value="" selected=selected>集中供暖</option>
                                    <option value="1">分户采暖</option>
                                    <option value="2">无采暖设施</option>
                                </select>
                            </span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>门禁系统：</dt>
                        <dd>
                            <span class="selectOption">
                                <select name="T_EntranceID" id="T_EntranceID">
                                    <option value="" selected=selected>有</option>
                                    <option value="1">无</option>
                                </select>
                            </span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>其它：</dt>
                        <dd>
                            <textarea name="T_Else" class="pxtextarea" style=" height:99px;overflow-y:visible" id="T_Else" placeholder="请输入备注信息"></textarea>
                        </dd>
                    </dl>
                    <dl>
                        <dd class="">
                            <button class="button blue" data-id="190317" id="jbSub" type="button" onclick="insertBuilding()">
                                保存
                            </button>
                        </dd>
                    </dl>
                </div>
            </div>
        </div>
        <div class="footer">
            <div class="footer_top">
                <ul class="user_info">
                    <a href="Index.html">主页</a>
                </ul>
                <ul class="back_top">
                    <a href="javascript:scroll(0,0)">TOP</a>
                </ul>
            </div>
            <ul class="copyright">
                <li>
                    <a href="javascript:;">电脑版</a><span>|</span><a href="javascript:;">普通版</a><span>|</span><a href="javascript:;">用户反馈</a><span>|</span><a href="javascript:;">联系我们</a>
                </li>
                <li>&copy;Copyright 北京中资房产 by 房产估价系统1.0 </li>
            </ul>
        </div>
    </div>

    <!--js引用文件-->

    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/layer/layer.js"></script>
    <script type="text/javascript" src="writeJS/Common.js"></script>
    <script type="text/javascript" src="writeJS/Jst_Facility.js"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=p2TmwerE1yfUcUbwRGnFYT38Wn9hO3qp&coor=bd09ll"></script>
    <script type="text/javascript">
        var map = new BMap.Map("allmap");//创建地图实例
        //页面初始化
        $(function () {
            //初始化地图 默认加载北京天安门
            var point = new BMap.Point(116.331398, 39.897445);
            map.centerAndZoom(point, 16);//初始化地图，point为中心点，缩放级别为16
            //判断手机浏览器是否支持定位
            if (navigator.geolocation) {
                var geolocation = new BMap.Geolocation();//创建定位实例
                geolocation.getCurrentPosition(showLocation, { enableHighAccuracy: true });//enableHighAccuracy 要求浏览器获取最佳结果
            } else {
                map.addControl(new BMap.GeolocationControl());//添加定位控件 支持定位
            }
        });
        //处理定位后的信息
        function showLocation(r) {
            if (this.getStatus() == BMAP_STATUS_SUCCESS) {//定位成功
                //坐标获得
                if (wapx == 0 || wapy == 0) {
                    wapx = r.longitude;
                    wapy = r.latitude;
                }
                //新建中心点 并将地图中心移动过去
                var centerPoint = new BMap.Point(wapx, wapy);
                map.panTo(centerPoint);
                map.setCenter(centerPoint);
                $("#T_Location").val(r.longitude + "," + r.latitude);
                //新建标注
                var mk = new BMap.Marker(centerPoint);
                mk.disableDragging();// 不可拖拽
                map.addOverlay(mk);

                var geoc = new BMap.Geocoder();
                geoc.getLocation(centerPoint, getCityByCoordinate);
                //单击新地址
                map.addEventListener("click", function (e) {
                    var pt = e.point;
                    geoc.getLocation(pt, function (rs) {
                        //新建中心点 并将地图中心移动过去
                        var centerPoint = new BMap.Point(pt.lng, pt.lat);
                        map.panTo(centerPoint);
                        map.setCenter(centerPoint);
                        $("#T_Location").val(pt.lng + "," + pt.lat);

                        //删除以前的标注
                        map.removeOverlay(mk);

                        //新建标注
                        mk = new BMap.Marker(centerPoint);
                        mk.disableDragging();// 不可拖拽
                        map.addOverlay(mk);

                        var addComp = rs.addressComponents;

                        //alert(addComp.province + ", " + addComp.city + ", " + addComp.district + ", " + addComp.street + ", " + addComp.streetNumber);
                        $("#T_LocationAddress").val(addComp.city + addComp.district + addComp.street + addComp.streetNumber);
                    });
                });
            }
            else {
                layer.msg('定位失败' + this.getStatus(), { icon: 2, time: 1000 });//定位失败
            }
        }

        function getCityByCoordinate(rs) {
            var addComp = rs.addressComponents;
            //alert(addComp);
            //alert(addComp.province + ", " + addComp.city + ", " + addComp.district + ", " + addComp.street + ", " + addComp.streetNumber);
            $("#T_LocationAddress").val(addComp.city + addComp.district + addComp.street + addComp.streetNumber);
        }
    </script>
</body>
</html>
